import { type RouteRecordRaw } from 'vue-router'
/**
 * 定义静态页面
 * @link 参考：https://next.router.vuejs.org/zh/guide/essentials/history-mode.html#netlify
 */
const StaticsRoutes: Array<RouteRecordRaw> = [
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/index.vue'),
    meta: {
      title: '登录',
      isHide: true
    }
  },
  {
    path: '/:path(.*)*',
    name: '404',
    component: () => import('@/views/error/404.vue'),
    meta: {
      title: 'message.staticRoutes.notFound',
      isHide: true
    }
  },
  {
    path: '/401',
    name: '401',
    component: () => import('@/views/error/401.vue'),
    meta: {
      title: 'message.staticRoutes.noPower',
      isHide: true
    }
  }
]

// 错误路由页面
export const ErrorPageRoute: RouteRecordRaw = {
  path: '/:path(.*)*',
  name: '404',
  component: () => import('@/views/error/404.vue'),
  meta: {
    title: 'message.staticRoutes.notFound',
    isHide: true
  }
}

// 无权限路由
export const NoPermissionPageRoute: RouteRecordRaw = {
  path: '/401',
  name: '401',
  component: () => import('@/views/error/401.vue'),
  meta: {
    title: 'message.staticRoutes.noPower',
    isHide: true
  }
}

export default StaticsRoutes
